/**
 * 
 */
package com.wistech.search.solr;

import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.solr.core.SolrResourceLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author Liuye
 * 
 */
@SuppressWarnings("serial")
public class UpdateDataServlet extends HttpServlet {
	final Logger log = LoggerFactory.getLogger(UpdateDataServlet.class);
	private boolean hasMulticore = false;
	private static final Charset UTF8 = Charset.forName("UTF-8");
	@Override
	public void init() throws ServletException {
		// Check if the "solr.xml" file exists -- if so, this is an invalid
		// servlet
		// (even if there is only one core...)
		String solrHomeDir = SolrResourceLoader.locateSolrHome();
		File fconf = new File(solrHomeDir, "solr.xml");
		hasMulticore = fconf.exists();

		log.info("SolrUpdateServlet.init() done");
	}
	@Override
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
	}

}
